package com.jieshao.utils

import com.intellij.DynamicBundle
import com.intellij.ide.plugins.PluginManagerCore
import com.intellij.openapi.extensions.PluginId
import org.jetbrains.annotations.NotNull
import org.jetbrains.annotations.PropertyKey

private const val IDEA_ACTIONS_BUNDLE = "messages.LineShareBundle"

const val PLUGIN_ID = "LineShare-intellij-plugin"

object LineShareBundle : DynamicBundle(IDEA_ACTIONS_BUNDLE) {

    const val ISSUE_URL: String = "https://gitee.com/tqybt/line-share-intellij-plugin/issues"

    fun message(@NotNull @PropertyKey(resourceBundle = IDEA_ACTIONS_BUNDLE) key: String, vararg params: Any): String {
        return getMessage(key, *params)
    }

    fun plugin() = PluginManagerCore.getPlugin(PluginId.getId(PLUGIN_ID))

}